﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SSharp.Core.Evaluator {
	public static partial class Eval {
		/// <summary>
		/// An evaluator for a single type of expression.
		/// </summary>
		private interface Evaluator {
			/// <summary>
			/// Returns true if this evaluator can evaluate the given expression
			/// </summary>
			bool CanEvaluate(object expression);

			/// <summary>
			/// Evaluates the given expression in the given environment.
			/// Can assume CanEvaluate returns true; this is the only time this method can be called.
			/// </summary>
			EvaluationResult Evaluate(object expression, IEnvironment env);
		}

	}
}
